<% content_for :main_content do %>
<div class="row">
  <div class="col-lg-12">
      <section class="panel">
          <header class="panel-heading">
            在线用户
          </header>
          <div class="panel-body">
            <div class="space15"></div>

            <table class="table table-striped table-advance table-hover">
              <thead>
              <tr>
                  <th>终端</th>
                  <th>客户端</th>
                  <th>手机号</th>
                  <th>有效时长</th>
                  <th>剩余时间</th>
                  <th></th>
              </tr>
              </thead>
                <tbody>
                <% @auth_tokens.each do |auth_token| %>
                  <tr>
                    <td><%= auth_token.mac %></td>
                    <td><%= auth_token.client_identifier %></td>
                    <td><%= auth_token.account.try(:mobile) %></td>
                    <td><%= humanize_second auth_token.duration.to_i %></td>
                    <td><%= humanize_second auth_token.left_duration %></td>
                    <td><%= link_to '强制下线', disable_merchant_auth_token_path(auth_token), method: :post, data: { confirm: 'Are you sure?' } %></td>
                  </tr>
                <% end %>
              </tbody>
          </table>
          </div>
      </section>
  </div>
</div>
<!-- page end-->
<% end %>

<% content_for :script do %>

<% end %>